<@cms.dictionaryList name=name pageIndex=pageNum pageSize=numPerPage>
<@sys.authorized roleIds=admin.roles urls='cmsDictionary/add,cmsDictionary/delete,cmsDictionary/export,cmsDictionary/import'><#assign authorizedMap=map/></@sys.authorized>
<div class="pageHeader card">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <li>
                        <label><@t.page 'name'/>:</label>
                        <input type="text" name="name" value="${name!}"/>
                    </li>
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                    <#if !site.parentId?has_content && authorizedMap['cmsDictionary/export']>
                        <li>
                            <a class="button" href="cmsDictionary/export?_csrf=<@tools.csrfToken admin=true/>" target="dwzExport" targetType="navTab"><i class="icon-download-alt icon-large"></i><@t.page 'button.export'/></a>
                        </li>
                    </#if>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="card">
    <div class="panelBar">
        <ul class="toolBar">
        <#if !site.parentId?has_content && authorizedMap['cmsDictionary/add']>
            <li><a href="cmsDictionary/add.html" target="navTab" rel="cmsDictionary/add"><i class="icon-plus-sign-alt icon-large"></i><@t.page 'button.add'/></a></li>
        </#if>
        <#if !site.parentId?has_content && authorizedMap['cmsDictionary/delete']>
            <li><a href="cmsDictionary/delete?_csrf=<@tools.csrfToken admin=true/>" title="<@t.page 'confirm.batch_delete'/>" target="selectedTodo" rel="ids"><i class="icon-trash icon-large"></i><@t.page 'button.batch_delete'/></a></li>
        </#if>
        <#if !site.parentId?has_content && authorizedMap['cmsDictionary/import']>
            <li><a href="cmsDictionary/import.html" target="dialog" mask="true" width="500" height="250"><i class="icon-upload-alt icon-large"></i><@t.page 'import'/></a></li>
        </#if>
        </ul>
    </div>
    <table class="table" width="100%" layoutH>
        <thead>
            <tr>
                <th width="20"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
                <th><@t.page 'id'/></th>
                <th><@t.page 'name'/></th>
                <th><@t.page 'dictionary.childDepth'/></th>
                <th><@t.page 'operate'/></th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr>
                <td class="center"><input name="ids" value="${a.id.id}" type="checkbox"></td>
                <td>${a.id.id}</td>
                <td class="exclude-translate">${a.name!}</td>
                <td>${a.childDepth}</td>
                <td class="wrap">
                <#if a.childDepth gt 0>
                    <a href="cmsDictionary/addChild.html?id=${a.id.id}" class="edit btnText blue" target="dialog" mask="true"><i class="icon-edit"></i><@t.page 'button.edit'/></a>
                <#else>
                    <a href="cmsDictionary/add.html?id=${a.id.id}" class="edit btnText blue" target="navTab" rel="cmsDictionary/edit"><i class="icon-edit"></i><@t.page 'button.edit'/></a>
                </#if>
                <#if !site.parentId?has_content && authorizedMap['cmsDictionary/export']>
                    <a href="cmsDictionary/export?id=${a.id.id}&_csrf=<@tools.csrfToken admin=true/>" class="edit btnText" target="_blank"><i class="icon-download-alt icon-large"></i><@t.page 'button.export'/></a>
                </#if>
                <a href="cmsDictionary/excludeTree.html?id=${a.id.id}" class="btnText blue" target="navTab" rel="cmsDictionary/excludeTree" title="${a.name!}" icon="<i class='bi bi-exclude'></i>"><i class="bi bi-exclude"></i><@t.page 'dictionary.exclude'/></a>
                <#if !site.parentId?has_content && authorizedMap['cmsDictionary/delete']>
                    <a href="cmsDictionary/delete?ids=${a.id.id}&_csrf=<@tools.csrfToken admin=true/>" class="btnText warn" title="<@t.page 'confirm.delete'/>" target="ajaxTodo"><i class="icon-trash"></i><@t.page 'button.delete'/></a>
                </#if>
                </td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@cms.dictionaryList>